
var proxy = "PROXY p01.metiy.xyz:1080;";
var direct = 'DIRECT;';

var domains = {
  "google.com": 1, 
  "pinterest.com": 1,
  "openai.com": 1,
  "facebook.com": 1
};


var hasOwnProperty = Object.hasOwnProperty;

function FindProxyForURL(url, host) {
    var suffix;
    var pos = host.lastIndexOf('.');
    while(1) {
        suffix = host.substring(pos + 1);

        if (hasOwnProperty.call(domains, suffix)) {
            return proxy;
        }

        if (pos <= 0) {
            break;
        }

        pos = host.lastIndexOf('.', pos - 1);
    }

    return direct;
}

